@import './color.scss';

.kxui-noScrollBar {
  overflow-x: hidden !important;
  overflow-y: hidden !important;
}

.kxui-Popup-alert,
.kxui-Popup-ask,
.kxui-Popup-loading,
.kxui-Popup-remind,
.kxui-Popup-tips,
.kxui-Popup-win {
  * {
    font-family: "PingFang SC", "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", 微软雅黑, 黑体, Arial, sans-serif;
    font-size: 14px;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    color: $popupDefaultFont;
  }

  ul,
  li {
    list-style-type: none;
  }

  a {
    text-decoration: none;
  }
}

.kxui-Popup-animation,
.kxui-loading-hide,
.kxui-topBtn,
.kxui-Popup-close,
.kxui-Popup-shrink,
.kxui-Popup-show,
.kxui-Popup-hide,
.kxui-Popup-btn,
.kxui-Popup-shade {
  transition: all .2s !important;
}

.kxui-Popup-show,
.kxui-Zoom-noTra-show {
  animation: show .2s linear infinite;
  animation-iteration-count: 1;
}

.kxui-Popup-hide,
.kxui-Zoom-noTra-hide {
  animation: hide .2s linear infinite;
  animation-iteration-count: 1;
}

@keyframes show {
  0% {
    transform: scale(.92);
  }

  25% {
    transform: scale(.94);
  }

  50% {
    transform: scale(.96);
  }

  75% {
    transform: scale(.98);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes hide {
  0% {
    transform: scale(1);
  }

  25% {
    transform: scale(.98);
  }

  50% {
    transform: scale(.96);
  }

  75% {
    transform: scale(.94);
  }

  100% {
    transform: scale(.92);
  }
}

.kxui-Popup-loading-0 {
  width: 36px;
  height: 36px;
  display: block;
  font-size: 0;
  color: $white;
  position: relative;
  box-sizing: border-box;

  >div {
    width: 36px;
    height: 36px;
    position: relative;
    box-sizing: border-box;
    display: inline-block;
    float: none;
    background-color: currentColor;
    border: 0 solid currentColor;
    background: transparent;
    border-width: 2px;
    border-bottom-color: transparent;
    border-radius: 100%;
    animation: ball-clip-rotate 1.25s linear infinite;
  }
}

.kxui-Popup-loading-1 {
  width: auto;
  height: auto;

  >div {
    width: 39px;
    height: 39px;
    position: relative;
    box-sizing: border-box;
    display: block;
    font-size: 0;
    color: $white;
    animation: ball-spin-fade-rotating-rotate 6s infinite linear;

    >div {
      width: 2px;
      height: 10px;
      position: relative;
      box-sizing: border-box;
      display: inline-block;
      float: none;
      background-color: currentColor;
      border: 0 solid currentColor;
      position: absolute;
      margin: 2px;
      margin-top: -5px;
      margin-left: -1px;
      border-radius: 0;
      animation: line-spin-fade-rotating 1s infinite ease-in-out;
    }

    >div:nth-of-type(1) {
      top: 15%;
      left: 50%;
      transform: rotate(0deg);
      animation-delay: -1.125s;
    }

    >div:nth-of-type(2) {
      top: 25.2512626585%;
      left: 74.7487373415%;
      transform: rotate(45deg);
      animation-delay: -1.25s;
    }

    >div:nth-of-type(3) {
      top: 50%;
      left: 85%;
      transform: rotate(90deg);
      animation-delay: -1.375s;
    }

    >div:nth-of-type(4) {
      top: 74.7487373415%;
      left: 74.7487373415%;
      transform: rotate(135deg);
      animation-delay: -1.5s;
    }

    >div:nth-of-type(5) {
      top: 84.9999999974%;
      left: 50.0000000004%;
      transform: rotate(180deg);
      animation-delay: -1.625s;
    }

    >div:nth-of-type(6) {
      top: 74.7487369862%;
      left: 25.2512627193%;
      transform: rotate(225deg);
      animation-delay: -1.75s;
    }

    >div:nth-of-type(7) {
      top: 49.9999806189%;
      left: 15.0000039834%;
      transform: rotate(270deg);
      animation-delay: -1.875s;
    }

    >div:nth-of-type(8) {
      top: 25.2506949798%;
      left: 25.2513989292%;
      transform: rotate(315deg);
      animation-delay: -2s;
    }
  }
}

// loading-0 动画
@keyframes ball-clip-rotate {
  0% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(180deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

// loading-1 动画
@keyframes ball-spin-fade-rotating-rotate {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes line-spin-fade-rotating {
  50% {
    opacity: .2;
  }

  100% {
    opacity: 1;
  }
}

.kxui-Popup-move {
  position: fixed;
  z-index: 19920217;
  top: 0;
  left: 0;
  display: none;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.kxui-Popup-move-operation {
  display: block;
  cursor: move;
}

.kxui-Popup-shade {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  background: $popupDefaultShadow;
}

.kxui-Popup-shade-pointer {
  cursor: pointer;
}

.kxui-Popup-max {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.kxui-Popup-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 15px;
  height: 15px;
  cursor: se-resize;
}

.kxui-Popup-diy {

  .kxui-Popup-shrink:hover,
  .kxui-Popup-close:hover,
  .kxui-Popup-btn:hover,
  .kxui-Popup-btn-mobile:hover {
    opacity: .5 !important;
  }

  .kxui-Popup-shrink:active,
  .kxui-Popup-close:active,
  .kxui-Popup-btn:active,
  .kxui-Popup-btn-mobile:active {
    opacity: .35 !important;
    box-shadow: none !important;
  }
}

.kxui-Popup-event {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  text-align: right;

  .kxui-Popup-btn,
  .kxui-Popup-btn-mobile {
    line-height: 30px;
    display: inline-block;
    overflow: hidden;
    min-width: 60px;
    max-width: 320px;
    height: 30px;
    margin-bottom: 5px;
    margin-left: 5px;
    padding: 0 8px;
    cursor: pointer;
    text-align: center;
    text-overflow: ellipsis;
    border: 1px solid $popupDefaultBorder;
    border-radius: 1px;
    white-space: nowrap;
  }

  .kxui-Popup-btn:hover,
  .kxui-Popup-btn-mobile:hover {
    background: $popupDefaultHover;
  }

  .kxui-Popup-btn:active,
  .kxui-Popup-btn-mobile:active {
    background: $popupDefaultHover;
    box-shadow: 2px 2px 5px $popupDefaultBorder inset;
  }
}

.kxui-Popup-event-mobile {
  display: flex;
  padding: 0;

  .kxui-Popup-btn-mobile {
    line-height: 40px;
    height: 40px;
    margin: 0;
    border-left: none;
    border-bottom: none;
    flex: 1;
  }

  .kxui-Popup-btn-mobile:last-child {
    border-right: none;
  }
}

.kxui-Popup-bulk {
  position: fixed;
  overflow: hidden;
  opacity: 0;
  border: 1px solid $popupDefaultBorder;
  border-radius: 3px;
  background: $white;
  box-shadow: 2px 2px 5px $popupDefaultShadow;

  .kxui-Popup-title {
    line-height: 40px;
    position: relative;
    overflow: hidden;
    height: 40px;
    padding-left: 20px;
    cursor: move;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .kxui-Popup-title-wholeBtn {
    width: calc(100% - 80px);
  }

  .kxui-Popup-title-oneBtn {
    width: calc(100% - 40px);
  }

  .kxui-Popup-title-noBtn {
    width: 100%;
    padding: 0 20px;
  }

  .kxui-Popup-shrink,
  .kxui-Popup-close {
    font-size: 17px;
    line-height: 40px;
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    cursor: pointer;
    text-align: center;
    text-indent: 0;
    color: $popupDefaultFont;
  }

  .kxui-Popup-shrink {
    right: 40px;
  }

  .kxui-Popup-shrink-one {
    right: 0;
  }

  .kxui-Popup-shrink:hover,
  .kxui-Popup-close:hover {
    background: $popupDefaultHover;
  }

  .kxui-Popup-shrink:active,
  .kxui-Popup-close:active {
    background: $popupDefaultHover;
    box-shadow: 2px 2px 5px $popupDefaultBorder inset;
  }

  .kxui-Popup-content {
    width: 100%;
    height: auto;
    word-wrap: break-word;
    word-break: break-all;
    color: $popupDefaultGray;
    border-top: 1px solid $popupDefaultBorder;

    iframe {
      width: 100%;
      height: 100%;
    }
  }
}

.kxui-Popup-title,
.kxui-Popup-shrink,
.kxui-Popup-close,
.kxui-Popup-event,
.kxui-Popup-loading {
  user-select: none !important;
}

.kxui-Popup-primary {
  border: 1px solid $popupPrimaryBorder !important;

  .kxui-Popup-title,
  .kxui-Popup-shrink,
  .kxui-Popup-close {
    color: $white;
    background: $popupPrimaryColor;
  }

  .kxui-Popup-shrink:hover,
  .kxui-Popup-close:hover {
    background: $popupPrimaryHover;
  }

  .kxui-Popup-shrink:active,
  .kxui-Popup-close:active {
    background: $popupPrimaryActive;
    box-shadow: 2px 2px 5px $popupPrimaryActiveShadow inset;
  }

  .kxui-Popup-content {
    border-top: 1px solid $popupPrimaryBorder;
  }

  .kxui-Popup-event {

    .kxui-Popup-btn:nth-child(1),
    .kxui-Popup-btn-mobile:last-child {
      color: $white;
      border: 1px solid $popupPrimaryBorder;
      background: $popupPrimaryColor;
    }

    .kxui-Popup-btn:hover,
    .kxui-Popup-btn-mobile:hover {
      color: $white;
      border: 1px solid $popupPrimaryBorder;
      background: $popupPrimaryHover;
    }

    .kxui-Popup-btn:active,
    .kxui-Popup-btn-mobile:active {
      background: $popupPrimaryActive;
      box-shadow: 2px 2px 5px $popupPrimaryActiveShadow inset;
    }
  }
}

.kxui-Popup-success {
  border: 1px solid $popupSuccessBorder !important;

  .kxui-Popup-title,
  .kxui-Popup-shrink,
  .kxui-Popup-close {
    color: $white;
    background: $popupSuccessColor;
  }

  .kxui-Popup-shrink:hover,
  .kxui-Popup-close:hover {
    background: $popupSuccessHover;
  }

  .kxui-Popup-shrink:active,
  .kxui-Popup-close:active {
    background: $popupSuccessActive;
    box-shadow: 2px 2px 5px $popupSuccessActiveShadow inset;
  }

  .kxui-Popup-content {
    border-top: 1px solid $popupSuccessBorder;
  }

  .kxui-Popup-event {

    .kxui-Popup-btn:nth-child(1),
    .kxui-Popup-btn-mobile:last-child {
      color: $white;
      border: 1px solid $popupSuccessBorder;
      background: $popupSuccessColor;
    }

    .kxui-Popup-btn:hover,
    .kxui-Popup-btn-mobile:hover {
      color: $white;
      border: 1px solid $popupSuccessBorder;
      background: $popupSuccessHover;
    }

    .kxui-Popup-btn:active,
    .kxui-Popup-btn-mobile:active {
      background: $popupSuccessActive;
      box-shadow: 2px 2px 5px $popupSuccessActiveShadow inset;
    }
  }
}

.kxui-Popup-info {
  border: 1px solid $popupInfoBorder !important;

  .kxui-Popup-title,
  .kxui-Popup-shrink,
  .kxui-Popup-close {
    color: $white;
    background: $popupInfoColor;
  }

  .kxui-Popup-shrink:hover,
  .kxui-Popup-close:hover {
    background: $popupInfoHover;
  }

  .kxui-Popup-shrink:active,
  .kxui-Popup-close:active {
    background: $popupInfoActive;
    box-shadow: 2px 2px 5px $popupInfoActiveShadow inset;
  }

  .kxui-Popup-content {
    border-top: 1px solid $popupInfoBorder;
  }

  .kxui-Popup-event {

    .kxui-Popup-btn:nth-child(1),
    .kxui-Popup-btn-mobile:last-child {
      color: $white;
      border: 1px solid $popupInfoBorder;
      background: $popupInfoColor;
    }

    .kxui-Popup-btn:hover,
    .kxui-Popup-btn-mobile:hover {
      color: $white;
      border: 1px solid $popupInfoBorder;
      background: $popupInfoHover;
    }

    .kxui-Popup-btn:active,
    .kxui-Popup-btn-mobile:active {
      background: $popupInfoActive;
      box-shadow: 2px 2px 5px $popupInfoActiveShadow inset;
    }
  }
}

.kxui-Popup-warning {
  border: 1px solid $popupWarningBorder !important;

  .kxui-Popup-title,
  .kxui-Popup-shrink,
  .kxui-Popup-close {
    color: $white;
    background: $popupWarningColor;
  }

  .kxui-Popup-shrink:hover,
  .kxui-Popup-close:hover {
    background: $popupWarningHover;
  }

  .kxui-Popup-shrink:active,
  .kxui-Popup-close:active {
    background: $popupWarningActive;
    box-shadow: 2px 2px 5px $popupWarningActiveShadow inset;
  }

  .kxui-Popup-content {
    border-top: 1px solid $popupWarningBorder;
  }

  .kxui-Popup-event {

    .kxui-Popup-btn:nth-child(1),
    .kxui-Popup-btn-mobile:last-child {
      color: $white;
      border: 1px solid $popupWarningBorder;
      background: $popupWarningColor;
    }

    .kxui-Popup-btn:hover,
    .kxui-Popup-btn-mobile:hover {
      color: $white;
      border: 1px solid $popupWarningBorder;
      background: $popupWarningHover;
    }

    .kxui-Popup-btn:active,
    .kxui-Popup-btn-mobile:active {
      background: $popupWarningActive;
      box-shadow: 2px 2px 5px $popupWarningActiveShadow inset;
    }
  }
}

.kxui-Popup-danger {
  border: 1px solid $popupDangerBorder !important;

  .kxui-Popup-title,
  .kxui-Popup-shrink,
  .kxui-Popup-close {
    color: $white;
    background: $popupDangerColor;
  }

  .kxui-Popup-shrink:hover,
  .kxui-Popup-close:hover {
    background: $popupDangerHover;
  }

  .kxui-Popup-shrink:active,
  .kxui-Popup-close:active {
    background: $popupDangerActive;
    box-shadow: 2px 2px 5px $popupDangerActiveShadow inset;
  }

  .kxui-Popup-content {
    border-top: 1px solid $popupDangerBorder;
  }

  .kxui-Popup-event {

    .kxui-Popup-btn:nth-child(1),
    .kxui-Popup-btn-mobile:last-child {
      color: $white;
      border: 1px solid $popupDangerBorder;
      background: $popupDangerColor;
    }

    .kxui-Popup-btn:hover,
    .kxui-Popup-btn-mobile:hover {
      color: $white;
      border: 1px solid $popupDangerBorder;
      background: $popupDangerHover;
    }

    .kxui-Popup-btn:active,
    .kxui-Popup-btn-mobile:active {
      background: $popupDangerActive;
      box-shadow: 2px 2px 5px $popupDangerActiveShadow inset;
    }
  }
}

.kxui-Popup-alert,
.kxui-Popup-ask {
  width: 260px;
  height: auto;

  .kxui-Popup-alert-content,
  .kxui-Popup-ask-content,
  .kxui-Popup-alert-content,
  .kxui-Popup-ask-content {
    overflow: auto;
    width: 100%;
    min-height: 60px;
    padding: 20px;
  }
}

.kxui-Popup-loading,
.kxui-Popup-loading-noShade {
  position: fixed;
  opacity: 0;

  .kxui-Popup-loading-img {
    border-radius: 3px;
  }

  .kxui-Popup-loading-text {
    font-size: 14px;
    position: absolute;
    top: 140%;
    left: -250%;
    display: block;
    width: 600%;
    padding: 0;
    margin: 0;
    text-align: center;
  }

  .kxui-Popup-loading-text-img {
    top: 105%;
  }
}

.kxui-Popup-loading {
  color: $white;

  >div {
    color: $white;

    >div {
      color: $white;
    }
  }

  .kxui-Popup-loading-text {
    color: $white;
  }
}

.kxui-Popup-loading-noShade {
  color: $popupDefaultGray;

  >div {
    color: $popupDefaultGray;

    >div {
      color: $popupDefaultGray;
    }
  }

  .kxui-Popup-loading-text {
    color: $popupDefaultGray;
  }
}

.kxui-Popup-win {
  .kxui-Popup-win-content {
    height: calc(100% - 40px);
    -webkit-overflow-scrolling: touch;
  }
}

.kxui-Popup-remind {
  position: fixed;
  padding: 10px 20px;
  opacity: 0;
  border: none;
  border-radius: 3px;
  background: $popupDefaultTips;
  box-shadow: 2px 2px 5px $popupDefaultShadow;

  >p {
    font-size: 14px;
    margin: 0;
    padding: 0;
    color: $white;
  }
}

.kxui-Popup-remind-primary {
  background: $popupPrimaryTransparent;
}

.kxui-Popup-remind-success {
  background: $popupSuccessTransparent;
}

.kxui-Popup-remind-info {
  background: $popupInfoTransparent;
}

.kxui-Popup-remind-warning {
  background: $popupWarningTransparent;
}

.kxui-Popup-remind-danger {
  background: $popupDangerTransparent;
}

.kxui-Popup-tips {
  position: absolute;
  padding-left: 15px;
  opacity: 0;

  .kxui-Popup-tips-arrow {
    font-size: 0;
    line-height: 0;
    position: absolute;
    top: 50%;
    left: 7px;
    display: block;
    overflow: hidden;
    margin-top: -8px;
    border-top: 8px solid transparent;
    border-right: 8px solid $popupDefaultTips;
    border-bottom: 8px solid transparent;
    border-left: none;
  }

  .kxui-Popup-tips-content {
    font-size: 14px;
    padding: 10px 10px;
    color: $white;
    border-radius: 3px;
    background-color: $popupDefaultTips;
    box-shadow: 2px 2px 5px $popupDefaultShadow;
  }
}

.kxui-Popup-tips-right {
  padding-right: 50px;
  padding-left: 0;

  .kxui-Popup-tips-right-arrow {
    right: 42px;
    left: auto;
    border-top: 8px solid transparent;
    border-right: none !important;
    border-bottom: 8px solid transparent;
    border-left: 8px solid $black;
  }

  .kxui-Popup-tips-content {
    box-shadow: -2px 2px 5px $popupDefaultShadow;
  }
}

.kxui-Popup-tips-primary {
  .kxui-Popup-tips-arrow {
    border-right: 8px solid $popupPrimaryTransparent;
  }

  .kxui-Popup-tips-right-arrow {
    border-left: 8px solid $popupPrimaryTransparent;
  }

  .kxui-Popup-tips-content {
    background-color: $popupPrimaryTransparent;
  }
}

.kxui-Popup-tips-success {
  .kxui-Popup-tips-arrow {
    border-right: 8px solid $popupSuccessTransparent;
  }

  .kxui-Popup-tips-right-arrow {
    border-left: 8px solid $popupSuccessTransparent;
  }

  .kxui-Popup-tips-content {
    background-color: $popupSuccessTransparent;
  }
}

.kxui-Popup-tips-info {
  .kxui-Popup-tips-arrow {
    border-right: 8px solid $popupInfoTransparent;
  }

  .kxui-Popup-tips-right-arrow {
    border-left: 8px solid $popupInfoTransparent;
  }

  .kxui-Popup-tips-content {
    background-color: $popupInfoTransparent;
  }
}

.kxui-Popup-tips-warning {
  .kxui-Popup-tips-arrow {
    border-right: 8px solid $popupWarningTransparent;
  }

  .kxui-Popup-tips-right-arrow {
    border-left: 8px solid $popupWarningTransparent;
  }

  .kxui-Popup-tips-content {
    background-color: $popupWarningTransparent;
  }
}

.kxui-Popup-tips-danger {
  .kxui-Popup-tips-arrow {
    border-right: 8px solid $popupDangerTransparent;
  }

  .kxui-Popup-tips-right-arrow {
    border-left: 8px solid $popupDangerTransparent;
  }

  .kxui-Popup-tips-content {
    background-color: $popupDangerTransparent;
  }
}